﻿using System;
using System.Data;
using Dos.ORM;

public partial class webmx_program_product_Add : PageBase
{
    public DataTable source;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            temple_rally ra = new temple_rally();
            ra.Name = Request["txtName"];
            ra.Year = int.Parse(Request["txtYear"]);
            ra.StartTime = DateTime.Parse(Request["txtStart"]);
            ra.EndTime = DateTime.Parse(Request["txtEnd"]);
            ra.SortID = int.Parse(Request["txtSort"]);
            int res = DB.Context.Insert(ra);
            if (res > 0)
                AlertRedirect("添加成功!", "list.aspx");
            else
                Alert("添加失败，请重试!");
        }
    }
}